package com.lut.edu.apm.webCenter;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @author Zhao Suzhen
 */
@SpringBootApplication
@ComponentScan(basePackages = {"com.lut.edu.apm.webCenter", "com.lut.edu.apm.payCenter", "com.lut.edu.apm.commodityCenter"})
@MapperScan("com.lut.edu.apm.commodityCenter.dao")
@MapperScan("com.lut.edu.apm.payCenter.dao")
@MapperScan("com.lut.edu.apm.webCenter.dao")
public class WebCenterApplication extends SpringBootServletInitializer {

    public static final String REDIS_TOKEN_KEY="login:token:{}";

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(WebCenterApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(WebCenterApplication.class, args);
    }
}
